using UnityEngine;


[System.Serializable]
public class DataKeyMap
{
    [Tooltip("动作命名项|唯一性")] public string actionName;

    [Tooltip("旧输入系统|判断项")] public bool isLegacy;
    [Tooltip("旧输入系统|按键名")] public KeyCode keyCode;
    [Tooltip("新输入系统|路径名")] public string newInputSystemPath;


    public DataKeyMap()
    {
        actionName = newInputSystemPath = string.Empty;
        keyCode = KeyCode.None;
        isLegacy = true;
    }

    public override string ToString()
    {
        return keyCode switch
        {
            KeyCode.None => "",
            KeyCode.UpArrow => "↑",
            KeyCode.DownArrow => "↓",
            KeyCode.LeftArrow => "←",
            KeyCode.RightArrow => "→",

            _ => $"{keyCode}"
        };
    }
}
